package testCasalib 
{
	import org.casalib.display.CasaMovieClip;
	import org.casalib.events.LoadEvent;
	import org.casalib.load.ImageLoad;
	import org.casalib.load.SwfLoad;
	
	/**
	 * ...
	 * @author ...
	 */
	public class imageload extends CasaMovieClip 
	{
		protected var _imageLoad:ImageLoad;
		protected var _swfLoad:SwfLoad;
		
		public function imageload() 
		{
            super();
			
            this._imageLoad = new ImageLoad("assets/1.jpg");
            this._imageLoad.addEventListener(LoadEvent.COMPLETE, _onComplete);
            this._imageLoad.start();
			
            this._swfLoad = new SwfLoad("assets/swf/calendar.swf");
            this._swfLoad.addEventListener(LoadEvent.COMPLETE, _onSWFComplete);
            this._swfLoad.start();
        }
		
		private function _onSWFComplete(e:LoadEvent):void 
		{
			this.addChild(this._swfLoad.contentAsMovieClip);
		}

        protected function _onComplete(e:LoadEvent):void {
            //this.addChild(this._imageLoad.contentAsBitmap);
			//this._imageLoad.contentAsBitmap.width = 50;
        }
	}

}